﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register Assembly="Online.UI" Namespace="Online.UI.WebControl" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>分面GridView跨页操作测试</title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            &nbsp;<asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click">搜索GridView1</asp:LinkButton>
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" EmptyDataText="没数据哦">
                <Columns>
                    <asp:TemplateField HeaderText="选择">
                        <ItemTemplate>
                            <asp:CheckBox ID="CheckBox1" runat="server" />
                            <asp:HiddenField ID="hidID" runat="server" Value='<%# DataBinder.Eval(Container.DataItem, "test1") %>' />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="一">
                        <ItemTemplate>
                            <%# DataBinder.Eval(Container.DataItem, "test1") %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="二">
                        <ItemTemplate>
                            <%# DataBinder.Eval(Container.DataItem, "test2") %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="三">
                        <ItemTemplate>
                            <%# DataBinder.Eval(Container.DataItem, "test3") %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="四">
                        <ItemTemplate>
                            <%# DataBinder.Eval(Container.DataItem, "test4") %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="请输入">
                        <ItemTemplate>
                            <asp:TextBox ID="txtNumber" runat="server" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="五">
                        <ItemTemplate>
                            <%# DataBinder.Eval(Container.DataItem, "test5") %>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
            <cc1:CustomPager ID="customPager" runat="server" OnPageIndexChanged="customPager_PageIndexChanged">
            </cc1:CustomPager>
        </div>
        <br />
        <hr />
        <br />
        <asp:LinkButton ID="LinkButton2" runat="server" OnClick="LinkButton2_Click">LinkButton</asp:LinkButton>&nbsp;
        <asp:GridView ID="GridView2" runat="server" EmptyDataText="没数据哦" AutoGenerateColumns="False"
            Width="538px">
            <Columns>
                <asp:TemplateField HeaderText="选择">
                    <ItemTemplate>
                        <asp:CheckBox ID="CheckBox1" runat="server" />
                        <asp:HiddenField ID="hidKey1" runat="server" Value='<%# DataBinder.Eval(Container.DataItem, "value1") %>' />
                        <asp:HiddenField ID="hidKey2" runat="server" Value='<%# DataBinder.Eval(Container.DataItem, "value2") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="一">
                    <ItemTemplate>
                        <%# DataBinder.Eval(Container.DataItem, "value1") %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="二">
                    <ItemTemplate>
                        <%# DataBinder.Eval(Container.DataItem, "value2")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="请输入">
                    <ItemTemplate>
                        <asp:DropDownList ID="ddlString" runat="server">
                            <asp:ListItem Text="" Value="" Selected="true" />
                            <asp:ListItem Text="string1" Value="string1" />
                            <asp:ListItem Text="string2" Value="string2" />
                            <asp:ListItem Text="string3" Value="string3" />
                            <asp:ListItem Text="string4" Value="string4" />
                        </asp:DropDownList>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="请输入">
                    <ItemTemplate>
                        <asp:TextBox ID="txtNumber" runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="五">
                    <ItemTemplate>
                        <%# DataBinder.Eval(Container.DataItem, "value3") %>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
        <cc1:CustomPager ID="customPager2" runat="server" OnPageIndexChanged="customPager2_PageIndexChanged">
        </cc1:CustomPager>
        <br />
        <hr />
        &nbsp;<br />
        <br />
        <asp:LinkButton ID="btnTest" Text="测试" runat="server" OnClick="btnTest_Click" />
    </form>
</body>
</html>
